Added the possibility to print the matrices for debug purpouse.