private <T> void appendToFile(@NotNull String fileName,
                                  @NotNull Collection<? extends T> entities) {
      writeToFile(fileName, entities, true);
    }
private <T> void appendToFile(@NotNull String fileName,
                                  @NotNull Collection<? extends T> entities)