Added some error handling callbacks.