code: static void save(KAFDocument kaf, String filename) {
  	try {
  	    File file = new File(filename);
  	    Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF8"));
  	    out.write(kafToStr(kaf));
  	    out.flush();
  	} catch (Exception e) {
  	    System.out.println("Error writing to file");
  	}
      }
docs: Writes the content of a given KAFDocument to a file.