write status to logfile