Close log at trap stop