allow user to provide the IO object that receives the print string