use IoResult for new_reader