adding AddPatternsFromFile utility method