                 self.imageDocumentsPath = imageDirectory
             }
             else {
-                println("Failed to create directory with name \(imageName): \(error!.localizedDescription)")
+                println("\n[KFWatchKitAnimations] Failed to create directory with name \(imageName): \(error!.localizedDescription)\n")
                 completion?(finished: false)
                 return
             }

        displayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes)
    }
    
    internal func takeSnapshot(displayLink: CADisplayLink) {
        if displayLink.timestamp > self.duration {
            displayLink.invalidate()
            println("Finished writing '\(self.imageName)' to the filesystem.")
            println(self.imageDocumentsPath)
            self.completionHolder.completion?(finished: true)
        }
        else if self.snapshotNumber > 1024 {
            displayLink.invalidate()
            println("This animation has exceeded the maximum number of images WatchKit will allow. Please record the sub-animations instead as a work-around.")
            self.completionHolder.completion?(finished: false)
        }
        else {

private var completionHolderAssociationKey: UInt8 = 0

extension UIView {
    final private class CompletionHolder {
        let completion: ((finished: Bool) -> Void)?
        
        init(completion: ((Bool) -> Void)?) {
            self.completion = completion
        }
    }
    
    final private var duration: CFTimeInterval! {
        get {
            return objc_getAssociatedObject(self, &durationAssociationKey) as? CFTimeInterval
        }
        set {
            objc_setAssociatedObject(self, &durationAssociationKey, newValue, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
        }
    }
    
    final private var imageDocumentsPath: String! {
        get {
            return objc_getAssociatedObject(self, &imageDocumentsPathAssociationKey) as? String
        }
        set {
            objc_setAssociatedObject(self, &imageDocumentsPathAssociationKey, newValue, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
        }
    }
    
    final private var imageName: String! {
        get {
            return objc_getAssociatedObject(self, &imageNameAssociationKey) as? String
        }
        set {
            objc_setAssociatedObject(self, &imageNameAssociationKey, newValue, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
        }
    }
    
    final private var snapshotNumber: Int! {
        get {
            return objc_getAssociatedObject(self, &snapshotNumberAssociationKey) as? Int
        }
        set {
            objc_setAssociatedObject(self, &snapshotNumberAssociationKey, newValue, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
        }
    }
    
    final private var completionHolder: CompletionHolder! {
        get {
            return objc_getAssociatedObject(self, &completionHolderAssociationKey) as? CompletionHolder
        }
        set {
            objc_setAssociatedObject(self, &completionHolderAssociationKey, newValue, objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
        }
    }
