Fixed logfile output, original was to stdout