modify popen pclose