         catch let error {
             print("Problem creating parent directory: \(error)")
         }
+        print("path: \(path)")
         self.db = levelDBOpen(path.cString)
     }
     

        #else
            let path = NSURL(fileURLWithPath: getLibraryPath(), isDirectory: true).URLByAppendingPathComponent(name).path ?? ""
        #endif
        return self.init(path:path, name:name)
    }
    
    class func getLibraryPath() -> String {

#endif

public func SearchPathForDirectoriesInDomains(_ directory: FileManager.SearchPathDirectory, _ domainMask: FileManager.SearchPathDomainMask, _ expandTilde: Bool) -> [String] {
    let bundle = Bundle.main
    let bundlePath = bundle.bundlePath
    if domainMask == .userDomainMask {
        switch directory {
        case .libraryDirectory:
            return [bundlePath + "/Library"]
        case .documentDirectory:
            return [bundlePath + "/Documents"]
        default:
            break
        }
    }
    return [""]
}
