initial error handling