*
* @param mergedFile output file resulting from the merged step
* @throws IOException when the merge step fails
*/
protected void merge(File mergedFile) throws IOException {
try (InputStream sequence = new SequenceInputStream(new SourceFilesEnumeration(log, files, verbose));
OutputStream out = new FileOutputStream(mergedFile);
InputStreamReader sequenceReader = new InputStreamReader(sequence, charset);
OutputStreamWriter outWriter = new OutputStreamWriter(out, charset)) {
log.info("Creating the merged file [" + ((verbose) ? mergedFile.getPath() : mergedFile.getName()) + "].");