Adding a function to search the text in files