Add error handling and custom 404 page