Open stream to state file