add debugging features to TermApp