with open(
                target_file.split("\\")[-1].replace(".pdf", "") +
                "_py_pdf.txt", "a+"
        ) as file:  # insert the seperate line and datetime everytime run the program
            file.write(70 * '=' + "\n")
            file.write(
                str(datetime.datetime.now()) + "( {0} )\n".format(
                    calendar.day_name[datetime.datetime.today().weekday()]))
        # Process the page one by one
        for file_text in file_texts:
            i += 1
            ac = AcoraBuilder(keywords)
            ac = ac.build()
            result_list = [
                list(element) for element in ac.findall(file_text)
            ]  # turn tuple in the list into List object -- Bug: cannot turn int into list
            result_dict = {}
            result_dict = combine_column_to_dict(result_list)

            if result_dict:  # only found result, it will write a line
                with open(
                        target_file.split("\\")[-1].replace(".pdf", "") +
                        "_py_pdf.txt",
                        "a+") as file:  # insert the search result
                    file.write("Page {0} : ".format(i) + "\n")
                    for key, values in result_dict.items():
                        file.write(
                            str(key) + ": " + str(values) +
                            " [Total: {0}".format(len(values.split(","))) +
                            "]\n")