added back the error messages in case the program gets stuck, which it did.
This way, we can see if there is some specific basis that the program gets stuck
in. Also printing out the basis now