     }
 }
 
+fileprivate extension SwiftyHealthKit {
+    fileprivate func debugCrash(message: String) {
+        assertionFailure([
+            "",
+            "------------",
+            "SwiftyHealthKit: " + message,
+            "------------",
+            ""
+            ].joined(separator: "\n"))
+    }
+}
+
 fileprivate extension Date {
     var startOfDay: Date {
         return Calendar(identifier: .gregorian).startOfDay(for: self)

            sortDescriptors: nil,
            resultsHandler: resultsHandler)
        store.execute(query)
    }
    
    public func overwriteSample(at date: Date, id: HKQuantityTypeIdentifier, quantity: HKQuantity, metadata: [String: String]? = nil, completion: @escaping Callback<Bool>) {

        }
    }
    
    private func statisticsCollection(at date: Date, id: HKQuantityTypeIdentifier, option: HKStatisticsOptions, completion: @escaping Callback<HKStatisticsCollection?>) {
        let cal = Calendar(identifier: .gregorian)
        var comp1 = cal.dateComponents([.day, .month, .year], from: date)
        comp1.hour = 0
