code: public PrintWriter openTrainLogFile() {
  	String filename = modelDir + File.separator + trainLogFile;
  	PrintWriter fout = null;
  	
  	try {
  	    fout = new PrintWriter(new OutputStreamWriter( (new FileOutputStream(filename)), "UTF-8"));	    
  	} catch (IOException e) {
  	    System.out.println(e.toString());
  	    return null;
  	}
  	
  	return fout;
      }
docs: Open train log file.
  
  @return the prints the writer