             if response?
               if 200 <= response.statusCode < 400
                 log "Uploaded image #{imageFileNames[ii]}"
-                newSubjectIDs.push subject.id
+                # Deal with multi-image subjects. Track if image upload is successful
+                successCount++
               else
                 error = response.body
 

              await subject.delete().then(defer _).catch(console.error.bind console)
              break

if newSubjectIDs.length is 0
  log 'No subjects to link'
else

        log "Saved subject #{subject.id}"

        # Locations array has been transformed into [{"mime type": "URL to upload"}]
        successCount = 0
        for location, ii in subject.locations
          for type, url of location
            headers = {'Content-Type': mime.lookup imageFileNames[ii]}
