 
     loadTemplateFile = (file, cb) =>
       fs.readFile file, (err, content) =>
+        return cb err if err
+
         file = path.normalize(file)
         index = file
           .replace(path.normalize(dirname), "")


    cb()

  initTemplates: (cb) ->
    # find all templates and save their content in a hash
    files = []
    @metadata().templates = {}

      (cb) => @runTriggers "before:init", cb
      (cb) => @runTriggers "after:init", cb
    ], (err) =>
      if err
        App.Logger.error err

      callback err if callback

  run: (options) ->
    @init options, (err) =>
      return if err

      @start options.cb

  @run: (options) ->
