File templateFile = new File(confDirectory, CONF_DIRECTORY + getFileSeparator() + TEMPLATE_FILE);
String readFile = readFile(templateFile);
File tempDirectory = ContextHolder.getContext().getTempDirectory();
File configurationFile = new File(tempDirectory, CONF_FILE);
if (!configurationFile.exists() && !configurationFile.createNewFile()) {
log.error("Failed to create file " + CONF_FILE + ".");
} else {
String replacement = getReplacement(readFile, alternativeValues);
writeFile(configurationFile, replacement);
}