         }
         
         let saveBlock: Void -> Void = {
-            var error: NSError?
-            
-            let success: Bool
             do {
                 try self.save()
-                success = true
-            } catch let error1 as NSError {
-                error = error1
-                success = false
-            } catch {
-                fatalError()
+            } catch let error as NSError {
+                dispatch_async(dispatch_get_main_queue(), {
+                    completion?(false, error)
+                })
+                return
             }
             
-            if success == true {
-                if let _parentContext = self.parentContext {
-                    _parentContext.saveAndCompletion(completion)
-                } else {
-                    dispatch_async(dispatch_get_main_queue(), {
-                        completion?(true, nil)
-                    })
-                }
+            if let _parentContext = self.parentContext {
+                _parentContext.saveAndCompletion(completion)
             } else {
                 dispatch_async(dispatch_get_main_queue(), {
-                    completion?(false, error)
+                    completion?(true, nil)
                 })
             }
         }

        }
        
        return coordinator
    }()
    
    private lazy var defaultManagedObjectModel : NSManagedObjectModel = {
        if self.modelName == nil {
            assert(true, "need set model name")
        }
        
        
        var modelURL = NSBundle.mainBundle().URLForResource(self.modelName!, withExtension: "momd")
        // need unit test
        if modelURL == nil {
           modelURL = NSBundle(forClass: SwCD.self).URLForResource(self.modelName!, withExtension: "momd")
        }
        var model = NSManagedObjectModel(contentsOfURL: modelURL!)
        return model!
    }()
    
    private var defaultPersistentStore : NSPersistentStore?
    

        context.obtainPermanentIDsBeforeSaving()
        context.registerContextDidSaveNotification()
        return context
        }()
    
    private lazy var rootSaveingContext : NSManagedObjectContext = {
        var context = NSManagedObjectContext(concurrencyType: .PrivateQueueConcurrencyType)
        context.performBlockAndWait({
            context.persistentStoreCoordinator = self.defaultCoordinator
        })
        context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
        return context
        }()
    
    private lazy var defaultCoordinator : NSPersistentStoreCoordinator = {
        var coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.defaultManagedObjectModel)
        
        do {
            try coordinator.addPersistentStoreWithType(
                NSSQLiteStoreType,
                configuration: nil,
                URL: self.storeURL(),
                options: nil)
        } catch let error as NSError {
            // re create
            let isMigrationError = (error.code == NSPersistentStoreIncompatibleVersionHashError) || (error.code == NSMigrationMissingSourceModelError)
            
            if error.domain == NSCocoaErrorDomain && isMigrationError {
                do {
                    try NSFileManager.defaultManager().removeItemAtURL(self.storeURL())
                } catch let error as NSError {
                    print("NSFileManager removeItemAtURL error : " + error.localizedDescription)
                    abort()
                }
                
                do {
                    try coordinator.addPersistentStoreWithType(
                        NSSQLiteStoreType,
                        configuration: nil,
                        URL: self.storeURL(),
                        options: nil)
                } catch let error as NSError {
                    print("create persistentStores error : " + error.localizedDescription)
                    abort()
                }
            }
