private static void writeToFile(@NotNull Path file, @NotNull String text) {
    try {
      Files.createDirectories(file.getParent());
      Files.writeString(file, text);
    }
    catch (NoSuchFileException e) {
      LOG.info(e.getMessage());
    }
    catch (IOException e) {
      LOG.info(e);
    }
  }
private static void writeToFile(@NotNull Path file, @NotNull String text)