private boolean processFilePairs(Map<File, File> inputFilePairs,
			File outputFolder) {
		boolean sucess = true;
		List<String> scriptLines;
		StringBuffer outputVideoFileName;
		String commandToRun;
		Map<String, String> templatePairs = new HashMap<String, String>();
		File avsScriptFile = new File(
				properties
						.getPropertyValue(ApplicationSetting.AVS_TEMPORARY_SCRIPT_FILE_NAME));
		try {
			for (Entry<File, File> filePair : inputFilePairs.entrySet()) {
				if ((avsScriptFile.exists() && (!avsScriptFile.delete()))) {
					throw new CantDeleteTemporaryScriptException(
							avsScriptFile.getName());

				}
				LOGGER.info(MERGING_PAIR, filePair.getKey(),
						filePair.getValue());
				// Form avs-script for each file
				templatePairs.putAll(templateService
						.getVSFilterPathTemplatePair());
				templatePairs.putAll(templateService
						.getVideoAndSybtitleFilesTemplatepairs(
								filePair.getKey(), filePair.getValue()));
				scriptLines = avsScriptService
						.getScriptCommandsFromTemplate(templatePairs);
				avsScriptFile = fileService.formAvsScriptFile(
						avsScriptFile.getAbsolutePath(), scriptLines);
				// Form command for each file
				outputVideoFileName = new StringBuffer();
				outputVideoFileName.append(outputFolder.getAbsolutePath());
				outputVideoFileName.append(File.separator);
				outputVideoFileName
						.append(fileService.getFileNameWithoutExtention(
								filePair.getKey().getName(),
								properties
										.getPropertyValue(ApplicationSetting.INPUT_VIDEO_FILE_EXTENTION)));
				outputVideoFileName
						.append(properties
								.getPropertyValue(ApplicationSetting.OUTPUT_VIDEO_FILE_EXTENTION));
				commandToRun = commandFormerService
						.getCommandFromApplicationSettings(
								avsScriptFile.getAbsolutePath(),
								outputVideoFileName.toString());
				// Run each command
				applicationRunner.runApplication(commandToRun);
			}
		} catch (CantDeleteTemporaryScriptException e) {
			sucess = false;
			LOGGER.debug(CANT_DELETE_TEMPORARY_SCRIPT, e.getMessage());
		} catch (WrongFileNameLengthException e) {
			sucess = false;
			LOGGER.debug(WRONG_FILE_NAME_LENGTH, e.getMessage());
		} catch (WrongExtentionLengthException e) {
			sucess = false;
			LOGGER.debug(WRONG_EXTENTION_LENGTH, e.getMessage());
		} catch (FileException e) {
			sucess = false;
			LOGGER.debug(WRONG_FILE_NAME, e);
		}
		return sucess;
	}