Better debug in sendmsg func. Small fix in cmd