Replace os.system by subprocess.call