add logging in send