StateReader modified and tested and reads the state.txt file