write a proper logfile