Add more defensive code in client Lib. Report more info in unit tester UI