 
     // 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.

    /// - Throws: TUSClientError
    public func uploadFileAt(filePath: URL) throws {
        do {
            let url = try Files.copy(from: filePath)
            guard let size = try url.resourceValues(forKeys: [.fileSizeKey]).fileSize else {
                print("Size is unknown")
                // TODO: Load data and try getting size
                throw TUSClientError.fileNotFound
            }
            
            // TODO: Duplicate
            let sizeInKiloBytes = 500 * 1024// Uses safe speed, 500kb
            let ranges = (0..<size).chunkRanges(size: sizeInKiloBytes)
            
            scheduleUploadsFor(url: url, ranges: ranges)
        } catch {
            throw TUSClientError.fileNotFound
        }
//        // TODO: Copy file from URL
//        let data = try findData(for: filePath)
//        scheduleUploadsFor(data: data)
    }
    
    /// Upload data

        // TODO: error handling
        
        // Store file now
        // TODO: Force
        let filePath = try! Files.store(data: data)
        let sizeInKiloBytes = 500 * 1024// Uses safe speed, 500kb
        let ranges = data.chunkRanges(size: sizeInKiloBytes)
        scheduleUploadsFor(filePath: filePath, ranges: ranges)
    }
    
    /// Start upload based on a file path
    /// - Parameters:
    ///   - filePath: The url to a file's location
    ///   - ranges: The ranges of the file to upload
    private func scheduleUploadsFor(filePath: URL, ranges: [Range<Int>]) {
        let tasks = ranges.map { range in
            UploadDataTask(filePath: filePath, range: range, uploader: Uploader())
        }
        
        total += tasks.count
        scheduler.addGroupedTasks(tasks: tasks)
    }

}

extension TUSClient: SchedulerDelegate {
