better printing on i/o tcp exceptions