private File searchConfigurationFile(String searchPathIfFails, String configurationFileName) throws ConfigurationException {
File retVal = new File(DEFAULT_CONFIG_DIRECTORY, configurationFileName);
if (!(retVal.exists() && retVal.canWrite())) {
File secondaryPath = new File(searchPathIfFails, configurationFileName);
if (secondaryPath.exists()) {
if (!secondaryPath.canWrite()) {
File defaultPath = new File(DEFAULT_CONFIG_DIRECTORY);
if (defaultPath.mkdirs()) {
log.info("Copying " + configurationFileName + " from " + secondaryPath.getPath() + " to "
+ defaultPath.getPath());
FileUtility.copyFile(secondaryPath, retVal);