add .dat file endings for matrix files