Write covariance matrices to file to save memory.