added error exit setting if there are tcp failures