def METHOD_NAME(filename, cmd):
    try:
        sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        sock.connect(filename)
    except socket.error:
        return None
    sock.send(('%s\n'%cmd).encode())
    buffer = ''
    while True:
        try:
            buffer += sock.recv(65536).decode()
        except socket.timeout:
            break
        eob =  buffer[-20:]
        if eob.find('END') > -1 or eob.find('ERROR') > -1:
            break
    sock.close()
    return buffer