Write 10000 matrices to file.