Implement 404 at the end of middleware chain