Added error handler support