docs: public File save(String filename) throws IOException
      {
          if ("-".equals(filename)) {
              // print to console
              try (Writer writer = new PrintWriter(System.out)) {
                  save(writer);
              }
              return null;
          }
          else { // write to file
              final File file = new File(filename);
              if (file.exists()) {
                  file.delete();
              }
              else {
                  // create necessary directories;
                  file.getParentFile().mkdirs();
              }
              Writer writer = new FileWriter(file);
              try {
                  save(writer);
              }
              finally {
                  writer.close();
              }
              return file;
          }
      }