log+cleanup