Update state.txt