Better error logging in tcpserver class
Fix problem with badge id negotiation