       unless type
         err = new Error 'Unsupported MIME type'
         err.payload = payload
-        return callback err
+        outPorts.error.send err
+        do callback
+        return
       if type.ext is 'gif'
         tmpFile = new temporary.File
         gm payload

  noflo.helpers.WirePattern c,
    in: 'in'
    params: 'frame'
    out: 'out'
    forwardGroups: true
    async: true
  , (payload, groups, out, callback) ->
    chunk = readChunk payload, 0, 262
    frame = if c.params.frame then c.params.frame else 0
    chunk.then (buffer) ->

          if err
            tmpFile.unlink()
            err.payload = payload
            outPorts.error.send err
            do callback
            return
          outPorts.out.send tmpFile.path
          do callback
          return
      else
        # Not a GIF, just send the tempfile path along
        outPorts.out.send payload
        do callback
        return
