close logfile