made NotFound error handler use templates