Added write matrix to file
Renamed method to read matrix