load matrix from file