Move static content and error handling after route definitions.