Changed os.popen to subprocess.call