change Open3.popen3 to IO::popen