can't we just put this `if opts[:output]` here?