First step of the resume feature from #24.

I just felt that the whole move operation should be done before release the locks.