Added exception handling for all Thread cases