add logging in send.