debug improvement in logic/expect