catch and log exceptions occurring in threads

Just logs to file, doesn't raise any error notification to main thread or notify user.
Strictly a debugging convenience (but very handy)