safe exit sequence

if exception happens in TC.run() error message window appears and
automatically shuts down
if no errir raw_input() works