Fixed typos, turn off error handling when debugging > 3, added error for wrong specification of state/status in -set-state-status, improved test2