fixed 404 handler to render razor view and now handles 500 errors.