Change CTSessionOperation to be concurrent operation (i.e. the operation will not complete until the asynchronous operation completes). This lets you use dependencies between operation as well as ensuring that the operation queue to which you add these operations will respect the maxConcurrentOperationCount values of the operation queue. Also, the `didWriteData` method should check to see if the operation was canceled, and if so, cancel the download task, too. Obviously, the `didCompleteWithError` should also indicate when the operation completes.