     return msg.send {room: msg.message.user.name}, "`#{projname}` env `#{ekey}` unset."
 
   robot.respond /tf env ([^\s]+)(?:\slist)?$/i, (msg) ->
-    return unless isAuthorized robot, msg
-
-    projname = msg.match[1].replace /\//, "_"
-
-    unless fs.existsSync("#{basepath}/#{projname}")
-      return msg.send {room: msg.message.user.name}, "Invalid project name: `#{projname}`"
+    projname = msg.match[1].replace /\//, "_"
+    return unless isAuthorized robot, msg
+    return if fileMissingSendAndReturnTrue msg, "#{basepath}/#{projname}", "Invalid project name: `#{projname}`"
 
     brainloc = "hubot-tf_#{projname}"
     localstorage = JSON.parse(robot.brain.get brainloc) or {}


  robot.respond /tf create key$/i, (msg) ->
    return unless isAuthorized robot, msg

    if fs.existsSync("#{publickey}")
      return msg.send {room: msg.message.user.name}, "Key exists!  Destroy it first."

    exec "ssh-keygen -f #{privatekey} -b 1024 -C hubot-tf -N ''", (error, stdout, stderr) ->
      #msg.send {room: msg.message.user.name}, "```\n#{stdout}\n```"

    return msg.send {room: msg.message.user.name}, "`#{projname}` env set: `#{ekey}` = `#{evalue}`"

  robot.respond /tf env ([^\s]+) unset ([^\s]+)$/i, (msg) ->
    projname = msg.match[1].replace /\//, "_"
    ekey = msg.match[2]
    return unless isAuthorized robot, msg
    return if fileMissingSendAndReturnTrue msg, "#{basepath}/#{projname}", "Invalid project name: `#{projname}`"

    brainloc = "hubot-tf_#{projname}"
    localstorage = JSON.parse(robot.brain.get brainloc) or {}
