             return value
         } else if let value = env[ConfigManagerStringConstants.EnvKey] {
             return value
-        } else if let bundleInfoDict = NSBundle.mainBundle().infoDictionary, value = bundleInfoDict["ConfigManagerEnv"] as? String {
+        } else if let bundleInfoDict = NSBundle.mainBundle().infoDictionary, let value = bundleInfoDict["ConfigManagerEnv"] as? String {
             return value
         }
         

        
        // Check if there is a key to extend another config file. If so, extend recursively.
        if let extendedContentsFilename = configurationPayload?[ConfigManagerStringConstants.ConfigurationExtensionKey] as? String,
            folderPath = path.URLByDeletingLastPathComponent,
            _ = configurationPayload
        {
            var extendedConfigurationPayload = readConfiguration(folderPath.URLByAppendingPathComponent(extendedContentsFilename)!)
            extendedConfigurationPayload?.updateWith(configurationPayload!)

    static func configFilePaths(defaultPath: String, configEnvironment: String?) -> [NSURL]? {
        let defaultUrlPath = NSURL.fileURLWithPath(defaultPath)
        var paths = [defaultUrlPath]
        
        guard let filename = defaultUrlPath.lastPathComponent else {
            return paths
        }
