Fixed bug with logfile output.