ugly hack to make sure we throw the error for the most-recently-unclosed-brace
oops
clean up some console logs