public RandomDispatcher(File backgroundPath, File targetPath, boolean isOnce) {
		
		// Initialize backgroundImageList
		List<File> backgroundImageList = new ArrayList<File>();
		for(File i: backgroundPath.listFiles(new ExtensionFilter())) 
			backgroundImageList.add(i);
		
		if(0 >= backgroundImageList.size())
			throw new IllegalArgumentException("Background directory is empty!");
		
		// Initialize targetImageList
		List<File> targetImageList = new ArrayList<File>();
		for(File i: targetPath.listFiles(new ExtensionFilter())) 
			targetImageList.add(i);
		
		if(0 >= targetImageList.size())
			throw new IllegalArgumentException("Target directory is empty!");
		
		// shuffle background images and target images
		List<File> shuffledBackgroundImageList = shuffle(backgroundImageList, isOnce ? 1 : targetImageList.size(), targetImageList.size());
		List<File> shuffledTargetImageList = shuffle(targetImageList, isOnce ? 1 : backgroundImageList.size(), 0);
		
		// for more target image list
		List<File> candidateTargetImageList = new ArrayList<File>(targetImageList);

		int candidateIndex = 0;
		while(backgroundImageList.size() > targetImageList.size()) {
			if(candidateTargetImageList.size() <= candidateIndex)
				candidateIndex = 0;
			targetImageList.add(candidateTargetImageList.get(candidateIndex++));
		}

		int imageListSize = shuffledBackgroundImageList.size();
		for(int i = 0; i < imageListSize; ++i)
			shuffledImageList.add(new RandomImageNode(shuffledBackgroundImageList.get(i),
					shuffledTargetImageList.get(i)));
	}