code: private void writeFile() throws IOException {
          historyFile.delete();
          try (FileWriter fw = new FileWriter(historyFile)) {
              for(int i=0; i < size();i++)
                  fw.write(Parser.fromCodePoints(get(i)) + (Config.getLineSeparator()));
          }
          if (historyFilePermission != null) {
              historyFile.setReadable(false, false);
              historyFile.setReadable(historyFilePermission.isReadable(), historyFilePermission.isReadableOwnerOnly());
              historyFile.setWritable(false, false);
              historyFile.setWritable(historyFilePermission.isWritable(), historyFilePermission.isWritableOwnerOnly());
              historyFile.setExecutable(false, false);
              historyFile.setExecutable(historyFilePermission.isExecutable(),
                      historyFilePermission.isExecutableOwnerOnly());
          }
      }
docs: Write the content of the history buffer to file
  
  @throws IOException io