Fixed multipage export failure failing on exception in popContext. Misc: added more debug messages.