add a log for freeing the stream