add logging to send