Debugged and added print statements everytime it switches states. Also add publisher for topic /state