Move error handling