def METHOD_NAME():
    inputFile = fileText.get()
    fileName = os.path.join(cwd + '/AlFileUnlatcher',
                            'files_database.lst')
    if os.path.exists(fileName):
        pass
    else:
        dFile = open(fileName, "x")
        dFile.close()
    filesList = []
    notFoundList = []
    otherList = []
    dFile = open(fileName, "r")
    files = dFile.readlines()
    for file in files:
        file = file.replace('\n', '')
        if os.path.basename(file) == inputFile:
            if os.path.isfile(file):
                filesList.append(file)
            else:
                notFoundList.append(file)
        else:
            otherList.append(file)
    dFile.close()
    lines = filesList + otherList
    nFile = open(fileName, "w+")
    for line in lines:
        line += '\n'
        nFile.write(line)
    nFile.close()
    lfl = len(filesList)
    lnfl = len(notFoundList)
    if (lfl == 0) or (lnfl != 0 and lfl == 0) or (lnfl != 0):
        check = subprocess.check_output(f'python {cwd}/AlFileUnlatcher'
                                        '/AlFileSearcher.py "' + ''
                                        '' + inputFile + '"')
        check = check.decode("utf-8").replace('\r\n', ',:;')
        output = check.split(',:;')[:-1]
        allFiles = [i + '\n' for i in output]
        dFile = open(fileName, 'a')
        dFile.writelines(allFiles)
        dFile.close()
        uniqlines = set(open(fileName).readlines())
        bar = open(fileName, 'w+').writelines(set(uniqlines))
        if bar:
            bar.close()
        for file in output:
            filename = os.path.basename(file)
            if filename == inputFile and file not in filesList:
                filesList.append(file)
    if len(filesList) == 0:
        text.delete(1.0, END)
        text.insert(1.0, 'Invalid input file')
    else:
        for file in filesList:
            directory = os.path.dirname(file)
            filename = os.path.basename(file)
            try:
                text.delete(1.0, END)
                text.insert(1.0, 'Opening ' + inputFile)
                os.startfile(os.path.join(directory, filename))
            except Exception as e:
                print(str(e))
                text.insert(1.0, 'Set a default application to open'
                            ' the input file')