moving as.output functions to iotools