Adding global error handler, need template