more error checks in thread move