Fixes #36: added debug logging in Error pop, push, and reset