                 
             } catch let error as NSError {
                 
-                print("\(error)")
+                DispatchQueue.main.async {
+                    
+                    // Send initialization failed notification
+                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: CRDCoreDataStack.notificationInitializedFailed), object: self, userInfo:["error": error])
+                }
+                
+                return
             }
             
             DispatchQueue.main.async {
                 
-                // Seed the database if necessary
-                if let delegate = self.delegate {
-                
-                    delegate.seedDataStore()
+                // Seed the database if the persistent store was newly created.
+                if persistentStoreNewlyCreated {
+    
+                    if let delegate = self.delegate {
+                        
+                        delegate.seedDataStore()
+                    }
                 }
                 
                 // Send initialization notification
-                NotificationCenter.default.post(name: NSNotification.Name(rawValue: CRDCoreDataStack.notificationInitialized), object: nil)
+                NotificationCenter.default.post(name: NSNotification.Name(rawValue: CRDCoreDataStack.notificationInitialized), object: self)
             }
         }
     }

            
            // Helper
            let persistentStoreURL = self.persistentStoreURL
            
            do {


                
                DispatchQueue.main.async {
                    
                    // Send initialization failed notification
                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: CRDCoreDataStack.notificationInitializedFailed), object: self)
                }
                
                return
