Configure error handler