SW-44. adding exception handling in threads