Added fail return code on errors in unit-testing.