added debugging around client.send to possibly intercept issues