private static void tryCreateDirectory(Path path) throws IOException {
    try {
      Files.createDirectory(path);
    }
    catch (FileAlreadyExistsException e) {
      if (!Files.isDirectory(path)) {
        throw e;
      }
    }
  }
private static void tryCreateDirectory(Path path)