Use subprocess instead of os.system