Adding a randomly generated pattern matrix file