445953 fixed loop closing stream write