fix bug related to subprocess.check_output