docs: public void addOutputFile(String file) {
          if (file != null) {
              File f = new File(file);
              if (f.isDirectory()) {
                  throw new IllegalArgumentException("output file parameter points to a directory, must be a file");
              } else if (f.exists() && !f.canWrite()) {
                  throw new IllegalArgumentException(
                          "output file parameter points to a file we have no write permissions");
              }
  
              setOutputFile(f);
          }
      }