private static void createOrTruncateFile(@NotNull Path path) throws IOException {
    Files.newByteChannel(path, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE).close();
  }
private static void createOrTruncateFile(@NotNull Path path)