private static @NotNull Path checkExists(String dir) {
    Path path = Paths.get(dir);
    try {
      Files.createDirectories(path);
    }
    catch (IOException e) {
      LOG.warn("Unable to create: " + path, e);
    }
    return path;
  }
private static @NotNull Path checkExists(String dir)