     """.data(using: .utf8)
 fileManager.createFile(atPath: imageURL.appendingPathComponent("Contents.json").path, contents: contents, attributes: nil)
 
+let expectedContentType = "image/png"
+
 for level in 1...60 {
     let resources = try resourceRepository.loadSubjects(type: .radical, level: level)
     print("Level \(level): \(resources.count) radicals")
     for resource in resources {
         let id = resource.id
         let radical = resource.data as! Radical
-        let renderableImages = radical.characterImages.filter({ $0.contentType == "image/png" })
+        let renderableImages = radical.characterImages.filter({ $0.contentType == expectedContentType })
         if renderableImages.isEmpty {
             print("Skipping radical \(id): no renderable images")
             continue

            task.resume()
        }
        downloadGroup.wait()
        
        let imagesetContents = """
            {

        fileManager.createFile(atPath: destinationBaseURL.appendingPathComponent("Contents.json").path, contents: imagesetContents, attributes: nil)
    }
}

print("Done")
PlaygroundPage.current.finishExecution()
