Now handling general 404 errors for any unknown paths.
Gracefully handling exceptions (500 errors) if they happen.