Added custom error handler
Fixed Async handling of exceptions