Added support for error callbacks
x