 				.skipRepeats())
 	}()
 
-
-	public init(url: NSURL, model: NSManagedObjectModel, modelConfiguration: String? = nil) {
+	public init(url: NSURL, model: NSManagedObjectModel, modelConfiguration: String? = nil) throws {
 		self.url = url
 		self.model = model
 		self.modelConfiguration = modelConfiguration

		self.persistentStoreCoordinator = coordinator

		if url.pathExtension != "mdcontainer" {
			fatalError("You must open a MantleData container.")
		}

		let fileManager = NSFileManager.defaultManager()

			do {
				try fileManager.createDirectoryAtURL(url, withIntermediateDirectories: false, attributes: nil)
			} catch let error as NSError {
				throw Error.CannotCreateContainer(error)
			}
		}

		if let modelConfiguration = modelConfiguration where !model.configurations.contains(modelConfiguration) {
			throw Error.ModelConfigurationNotFound
		}

		let storeURL = url.URLByAppendingPathComponent("Database.sqlite3")

		do {
			try persistentStoreCoordinator.addPersistentStoreWithType(NSSQLiteStoreType,
			                                                          configuration: modelConfiguration,
			                                                          URL: storeURL,
			                                                          options: nil)
		} catch let error as NSError {
			throw Error.CannotAddPersistentStore(error)
		}

		rootSavingContext = ObjectContext(parent: .PersistentStore(persistentStoreCoordinator),
		                            concurrencyType: .MainQueueConcurrencyType,
