ensuring 404 status code for custom error pages