add exception handling for worker threads, check out of memory