Added outbuf support to #read