updating cachematrix file