improve the tcp debugging stuff