State reset logic and diagnostic log statements.