fix logfile stuff