code: private static void writeVersionToVerFile(String version) throws IOException {
          //declared in a try-with-resource statement, it will be closed regardless of it completes normally or not      
      	try (PrintWriter writer = new PrintWriter(new File(DoradusServer.class.getResource("/" + VERSION_FILE).getPath()))) {
      		writer.write(version);
      	}
  
      }
docs: Write version to local file