private static @Nullable Reader getReader(@NotNull File file, @NotNull Charset charset, long skippedContents) {
    try {
      try {
        @SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
        InputStream inputStream = Files.newInputStream(file.toPath());
        //do not skip forward
        if (file.length() >= skippedContents) {
          long skipped = 0;
          while (skipped < skippedContents) {
            skipped += inputStream.skip(skippedContents - skipped);
          }
        }
        return new BufferedReader(new InputStreamReader(inputStream, charset));
      }
      catch (FileNotFoundException ignored) {
        if (FileUtilRt.createIfNotExists(file)) {
          return new BufferedReader(new InputStreamReader(Files.newInputStream(file.toPath()), charset));
        }
        return null;
      }
    }
    catch (Throwable ignored) {
      return null;
    }
  }
private static @Nullable Reader getReader(@NotNull File file, @NotNull Charset charset, long skippedContents)