Reworked unit test error checking
Reworked unit test error checking