Add simple exception logger for threads.