A stream wrapper for mtools