             print(error)
         }
         return accounts
-    }
-
-
-    /// Get the url for the document directory with a path component added
-    ///
-    /// - parameter path:      The path component that should be added to the directory
-    /// - parameter directory: Whether or not the path is a directory
-    ///
-    /// - returns: The URL describing the document directory with the added path component
-    private func getDocumentDirectory() -> URL?{
-        return (try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true))
-    }
-    
+    }    
 }

            SAMKeychain.setPassword(password, forService: "com.mobilabsolutions.jenkins.account", account: username)
        }
        
        var url = getDocumentDirectory()?.appendingPathComponent("Account")
        
        if !FileManager.default.fileExists(atPath: url!.absoluteString){
            _ = try? FileManager.default.createDirectory(at: url!, withIntermediateDirectories: true, attributes: nil)

        
        url?.appendPathComponent(account.baseUrl.absoluteString.addingPercentEncoding(withAllowedCharacters: CharacterSet.alphanumerics)!)
        
        NSKeyedArchiver.archiveRootObject(account, toFile: url!.path)
    }
    
    /// Return the full list of accounts
