Accept an io.Reader instead of a filename