Added error handler to run