anchor.diff:      } else {
         throw new InvalidInputException("MIME type not supported: $mime");
       }
  -    if(item!=null) {
  +    if (originalImage != null) {
         item.height = originalImage.height;
         item.width = originalImage.width;
   
  -    if (MimeTypes.webFriendlyTypes.contains(mime)) {
  -      _log.fine("Web-friendly MIME type, using original file for display");
  -      //filesWritten.add(await new Link(getFullFilePathForHash(item.id))
  -      //.create(getOriginalFilePathForHash(item.id), recursive: true));
  -    } else {
  -      _log.fine("Non-web-friendly MIME type, generating full-size image for display");
  -      filesWritten.add(await _writeBytes(getFullFilePathForHash(item.id),
  -          encodeJpg(originalImage, quality: 90),
  -          deleteExisting: true));
  -      _log.fine("Full-size image generated");
  -      item.fullFileAvailable = true;
  -    }
  -
  -    try {
  -      filesWritten.add(await _createAndSaveThumbnail(originalImage, item.id));
  -    } catch (e, st) {
  -      _log.warning("Error while generating thumbnail for ${item.id}", e, st);
  -      item.errors.add(
  -          "Error while generating thumbnail for ${item.id}: ${e.toString()}");
  -    }
  +      if (MimeTypes.webFriendlyTypes.contains(mime)) {
  +        _log.fine("Web-friendly MIME type, using original file for display");
  +        //filesWritten.add(await new Link(getFullFilePathForHash(item.id))
  +        //.create(getOriginalFilePathForHash(item.id), recursive: true));
  +      } else {
  +        _log.fine(
  +            "Non-web-friendly MIME type, generating full-size image for display");
  +        filesWritten.add(await _writeBytes(getFullFilePathForHash(item.id),
  +            encodeJpg(originalImage, quality: 90),
  +            deleteExisting: true));
  +        _log.fine("Full-size image generated");
  +        item.fullFileAvailable = true;
  +      }
  +
  +      try {
  +        filesWritten.add(await _createAndSaveThumbnail(originalImage, item.id));
  +      } catch (e, st) {
  +        _log.warning("Error while generating thumbnail for ${item.id}", e, st);
  +        item.errors.add(
  +            "Error while generating thumbnail for ${item.id}: ${e.toString()}");
  +      }
       }
   
       return filesWritten;
     }
  -
   
     Future<Null> _handleFileUpload(Item item) async {
       _log.fine("_handleFileUpload start");
  
positive.code:   @override
    Future<Null> performAdjustments(Item t) async {
      final StringBuffer downloadName = new StringBuffer();
      downloadName.write(t.uploaded.year.toString().substring(2,4));
      downloadName.write(t.uploaded.month.toString().padLeft(2,'0'));
      downloadName.write(t.uploaded.day.toString().padLeft(2,'0'));
      downloadName.write(t.uploaded.hour.toString().padLeft(2,'0'));
      downloadName.write(t.uploaded.minute.toString().padLeft(2,'0'));
      downloadName.write(t.uploaded.second.toString().padLeft(2,'0'));
      downloadName.write(t.uploaded.millisecond.toString().padLeft(3,'0'));
      downloadName.write(" - ");
      downloadName.write(t.tags.join(" ").replaceAll(":", ","));
  
      if(!MimeTypes.extensions.containsKey(t.mime)) {
        throw new Exception("Don't know extension for mime type: ${t.mime}");
      }
      downloadName.write(".");
  
negative.code:       try {
          final double durationDouble = double.parse(durationString);
          item.duration = (durationDouble * 1000).floor();
        } on FormatException catch (e, st) {
          item.errors.add("Could not interpret item duration: $durationString");
          _log.warning(
              "Could not interpret item duration: $durationString", e, st);
        }
      }
      result = await Process.run("ffprobe",
  