code: public void addLine(String line) {
          try {
              writer.append(line);
              writer.newLine();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
docs: add text, and a new line