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

#endif

public func SearchPathForDirectoriesInDomains(_ directory: FileManager.SearchPathDirectory, _ domainMask: FileManager.SearchPathDomainMask, _ expandTilde: Bool) -> [String] {
    switch directory {
    case .libraryDirectory:
        let fileManager = FileManager.default
        return [fileManager.currentDirectoryPath + "/Library"]
    default:
    break
    }
    return [""]
}

        do {
            #if swift(>=3.0)
                let dirpath =  NSURL(fileURLWithPath:path).deletingLastPathComponent?.path ?? ""
                //print("dirpath: \(dirpath)")
                let fm = FileManager.default
                try fm.createDirectory(atPath: dirpath, withIntermediateDirectories:true, attributes:nil)
            #else
