add logging for streaming mode