Error handling for move and copy