`ifail`? typo?
Also, can you check if there is indeed an error set, and if not, set it?