adding a debug log to print all states transitioned