cleaning before log dumping