allow IO object to be passed in for error output also