def METHOD_NAME(cmd, task):
    cmd_split = shlex.split(cmd)  # list(shlex.shlex(cmd))
    p = subprocess.run(
        cmd_split, stdout=subprocess.PIPE,
        stderr=subprocess.PIPE, universal_newlines=True)
    p.check_returncode()
    oFile = open(os.path.join(logFolder, task),'w')
    oFile.write(p.stdout)
    oFile.close()
    return p.stdout