flush IO after each write to a channel