added stack trace print outs to sockets for debugging