Improve unhandled error handling in prod mode
Merge pull request #342 from vadimi/master

Improve unhandled error handling in prod mode