Close log before moving