fix some bug in TCP, add verbose print function