Use run(cmd).to_s.strip instead