Added logging to state.