Replaced the old os.system by subprocess.call