Added a method for searching a string in text file