some IO and Iteratee helpers