Added 404 handling and turned off debug in production