File-moving deferred until file is closed