fixed sock_send + added dmt for debug mode