Implemented a class to check for a given pattern in a text file