worker thread exception handling