code: public void toFile() throws IOException
  	{
  		if (logFile != null)
  		{
  			FileWriter fstream = new FileWriter(logFile + ".rttxt");
  			BufferedWriter out = new BufferedWriter(fstream);
  
  			writeCPUdecls(out);
  			writeBUSdecls(out);
  			writeDeployObjs(out);
  			writeEvents(out);
  
  			out.flush();
  			out.close();
  		}
  
  	}
docs: Writing to log