Error checking added to tcp recv.