util for fill matrix from file