     })
     rekog.detectLabels rekogParams, (err, data) ->
       if err
+        robot.logger.error "hubot-rekognition: #{err}\nrekogParams are: #{require('util').inspect(rekogParams)}"
         msg.send "Something bad happened... Although I was able to receive the image, I'm blind to it..."
       else
         labelArray = []

    req = client.put(filename, headers)
    req.on 'response', (res) ->
      if (200 == res.statusCode)
        robot.logger.debug "file successfully uploaded here: #{client.https(filename)}"
        callRekog msg, filename
      else
        robot.logger.debug res
        robot.logger.error "Upload Error Code: #{res.statusCode}"
        sendRobotResponse msg, title, '[Upload Error]', link
    req.end(content)

    callRekog msg, 'father-and-son.jpg'

  robot.respond /What do you see?/i, (msg) ->
    robot.logger.debug "hubot-rekognition: trying to figure out what's in this image..."
    if /uploads.hipchat.com/.test(msg.message.text)
      imageUrl = msg.message.text.split('https://s3.amazonaws.com/uploads.hipchat.com/')[1]
      if !imageUrl
        msg.send 'Sorry - I can\'t seem to parse that image url. :('
      robot.logger.debug "hubot-rekognition: uploading this to s3: https://s3.amazonaws.com/uploads.hipchat.com/#{imageUrl}"
      s3FetchAndUpload msg, "https://s3.amazonaws.com/uploads.hipchat.com/#{imageUrl}", imageUrl.split('.')[1]
    else
      robot.logger.warning 'hubot-rekognition: doesn\'t look like an image was provided'
      msg.send 'Sorry - it doesn\'t look like you gave me an image to look at.'

  sendRobotResponse = (msg, title, image, link) ->
