refactoring withError, updating asm vm with one bool instruction