         return false
     }
     
-    private func databaseFilePath() -> URL? {
+    fileprivate var databaseFilePath: URL? {
         if let existing = pathToSQLiteFile {
             return existing
         } else if self.storeType == NSSQLiteStoreType {

    
    lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
        let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
        let url = self.databaseFilePath()
        
        Logging.log("Using DB file at \(url)")
        


public class CorePersistence {
    private let stack: CoreStack!
    
    public var sqliteFilePath: URL? {
        return stack.databaseFilePath
    }
    
    public lazy var mainContext: NSManagedObjectContext = {
        let context = self.stack.mainContext!
        context.name = "Main"
