Fixed logfile issue