     
     typealias onCompleteHandler = (resp : Response, error: NSError?) -> Void
     typealias onBeginHandler = () -> Void
-    typealias onProcessHandler = (progress: Progress, error: NSError?) -> Void
+    typealias onProcessHandler = (progress: Progress) -> Void
+    typealias onDownloadCompleteHandler = (url: NSURL) -> Void
     
     private var completeHandler: onCompleteHandler? = nil
     private var beginHandler: onBeginHandler? = nil
     private var processHandler: onProcessHandler? = nil
+    private var downloadHandler: onDownloadCompleteHandler? = nil
     private let session: Session
     
     private var resumeData: NSData? = nil

        }
    }
    
    /// Tick to get response
    public func tick(completeHandler: ((resp : Response, error: NSError?) -> Void)? = nil) -> Response {
        if let completeHandler = completeHandler {

        return handler
    }
    
    var download_handler: onDownloadCompleteHandler? {
        self.condition.lock()
        let handler = self.downloadHandler
        self.condition.unlock()
        return handler
    }
    
    private func waitForComplete() {
        if OSAtomicCompareAndSwap32(1, 1, &self.completed) {
            return
