for (int j = 0; j < files.length; j++) {
final File f = new File(fs.getDir(this.task.getProject()),
files[j]);
File outf = null;
if (this.task.getOutdir() != null && files[j].endsWith(".fo")) {
final String[] sa = mapper.mapFileName(files[j]);
outf = new File(this.task.getOutdir(), sa[0]);
} else {
outf = replaceExtension(f, ".fo", newExtension);
if (this.task.getOutdir() != null) {
outf = new File(this.task.getOutdir(), outf.getName());