Adding logging to send_stream