added callbacks and subscriptions to error handler