Wait for 'close' instead of 'finish' before moving file