load pattern from input file