fixed bug in logfile