String name = baseName.substring(0, baseName.length() - ext.length()) + terminal.getName() + "." + ext;
//TODO: make sure that name don't contain forbiden characters like ":" and so on...
File logFile = new File(name);
logFiles.set(i, logFile);
PrintStream ps = new PrintStream(logFile);
StarScriptLogHandler starScriptLogHandler = new StarScriptLogHandler(ps);
terminal.addLogHandler(starScriptLogHandler);
}
System.out.println("Logging to " + outputFile.getCanonicalPath());
break;
}