Added handler for all unhandled exceptions, closes #78