edit the moved file after moving a file when an exception is thrown because a swap file exists