docs: protected String getFilename(Object result, String filenamepre) {
      if(filenamepre == null || filenamepre.length() == 0) {
        filenamepre = "result";
      }
      for(int i = 0;; i++) {
        String filename = i > 0 ? filenamepre + "-" + i : filenamepre;
        Object existing = filenames.get(filename);
        if(existing == null || existing == result) {
          filenames.put(filename, result);
          return filename;
        }
      }
    }