Use more general io.Reader and io.Writer interfaces instead of os.File