better thread error handling