public static void writeToFile(@NotNull File file, @NotNull String text, @NotNull Charset charset) throws IOException {
    writeToFile(file, text.getBytes(charset));
  }
public static void writeToFile(@NotNull File file, @NotNull String text, @NotNull Charset charset)