small comment change
better stream handler structure for pending data on close