make halt and bail print number of machine steps
make debug print statements conditional
implement final by wrapping try block around main loop