put pop_context after printing errors, so errors may be encoded in that context