PrintWriter logfile = new PrintWriter
try { ... } finally{ logFile.close()}