#7 Added basic error handling in the move operation