Added print out state to stdout