 
     // Maintenance: We use static lets on a struct, instead of an enum, so that adding new cases won't break stability.
     // Alternatively we can ask users to always use `unknown default`, but we can't guarantee that everyone will use that.
-    public static let fileNotFound = TUSClientError(code: 1)
+    public static let couldNotCopyFile = TUSClientError(code: 1)
+    public static let filesizeNotKnown = TUSClientError(code: 2)
 }
 
 /// The TUSKit client.

        // TODO: error handling
        
        // Store file now
        let url = try! Files.store(data: data)
        let sizeInKiloBytes = 500 * 1024// Uses safe speed, 500kb
        let ranges = data.chunkRanges(size: sizeInKiloBytes)
        scheduleUploadsFor(url: url, ranges: ranges)
    }
    
    private func scheduleUploadsFor(url: URL, ranges: [Range<Int>]) {
        let tasks = ranges.map { range in
            UploadDataTask(url: url, range: range, uploader: Uploader())
        }
        
        total += tasks.count
        scheduler.addGroupedTasks(tasks: tasks)
    }

    /// Get Data based on URL
    /// - Parameter url: The target url to load data from
    /// - Throws: Throws TUSClientError
    /// - Returns: The loaded Data
    private func findData(for url: URL) throws -> Data {
        do {
            return try Data(contentsOf: url)
        } catch {
            let prefixedPath = "file://" + url.absoluteString
            let url = try URL(string:prefixedPath).or(willThrow: TUSClientError.fileNotFound)
            let data = try? Data(contentsOf: url)
            return try data.or(willThrow: TUSClientError.fileNotFound)
        }
    }
}

extension TUSClient: SchedulerDelegate {


final class UploadDataTask: Task {
    
    let filePath: URL
    let range: Range<Int>
    let uploader: Uploader
    
    init(filePath: URL, range: Range<Int>, uploader: Uploader) {
        self.filePath = filePath
        self.range = range
        self.uploader = uploader
    }
    
    func run(completed: @escaping ([Task]) -> ()) {
        // TODO: Error handling
        let data = try! Data(contentsOf: filePath)
        let sub = data[range]
        
        uploader.upload(data: sub, range: range) {
