updated logging and debug levels
added reset code to the state machine