Added support for writing out generated log files.