             return nil
         }
 
+        let context = DownloadingContext(url: url, request: request, options: options)
         // Ready to start download. Add it to session task manager (`sessionHandler`)
         let downloadTask = addDownloadTask(
-            for: url,
-            with: request,
-            options: options,
-            callback: createTaskCallback(completionHandler, options: options)
+            context: context, callback: createTaskCallback(completionHandler, options: options)
         )
-
-        startDownloadTask(downloadTask, url: url, request: request, options: options)
+        startDownloadTask(downloadTask, context: context)
         return downloadTask
     }
 

                    let (result, callback) = result

                    if let image = try? result.get() {
                        self.delegate?.imageDownloader(self, didDownload: image, for: url, with: response)
                    }

                    let imageResult = result.map { ImageLoadingResult(image: $0, url: url, originalData: data) }
                    let queue = callback.options.callbackQueue
                    queue.execute { callback.onCompleted?.call(imageResult) }
                }

    }

    private func addDownloadTask(
        context: DownloadingContext,
        callback: SessionDataTask.TaskCallback
    ) -> DownloadTask
    {
        // Ready to start download. Add it to session task manager (`sessionHandler`)
        let downloadTask: DownloadTask
        if let existingTask = sessionDelegate.task(for: context.url) {
            downloadTask = sessionDelegate.append(existingTask, url: context.url, callback: callback)
        } else {
            let sessionDataTask = session.dataTask(with: context.request)
            sessionDataTask.priority = context.options.downloadPriority
            downloadTask = sessionDelegate.add(sessionDataTask, url: context.url, callback: callback)
        }
        return downloadTask
    }

    private func startDownloadTask(_ downloadTask: DownloadTask, context: DownloadingContext) {

        let sessionTask = downloadTask.sessionTask
        guard !sessionTask.started else {
