Pass errors to the callback
Add error parameter to callback