Added some logging

Should be helpful for when the matrix is huge