Fix assertion in TestApp cleanup, added stack traces to assertions