#5 Fix issues introduced by previous refactor
#5 Fix test case with errors

Assert for any ret code != 0, more general