private void pickNextState(String fileContents) throws IOException {
		
		List<NusmvState> states = 
			new ArrayList<NusmvState>();
		NusmvState currentState = (NusmvState) this.currentNode.getState();
		
		try {
			states = NuSMVOutputHandler.addTransitionsFromState(
					fileContents, currentState, sts);
		} catch (IllegalArgumentException e) {
			// read the file too soon, one action was not complete 
			try {
				logger.info("Read file to soon, waiting..");
				Thread.sleep(200);
			} catch (InterruptedException ie) {
				ie.printStackTrace();
			}
			fileContents = IOUtils.readFileAsString(outFile);
			states = NuSMVOutputHandler.addTransitionsFromState(
					fileContents, currentState, sts);
		}
		
		if (!states.isEmpty()) {
			List<Node> nodes = currentNode.addChildren(states);
			int index = 0;
			if (nodes.size() > 1) {		
				for (int i = 0; i < nodes.size(); i++) {
					if (!nodes.get(i).subtreeIsVisited()) {
						index = i;
						break;
					}
				}
			}
			if (nodes.size() >= 1) {
				currentNode = nodes.get(index);
//				currentState = states.get(index);
				currentNode.visit();
				execCommand(String.valueOf(index));
			}				
		}
	}