     loader = @loaders[loader] if loader
     loader = @default_loader unless loader
 
-    @on_fail = -> callback null
+    @fail_fn = (url) -> callback null, url
 
     @pending++
     loader.call this, path, (result) =>

    require: (msg, callback) ->
      [_, module] = msg
      @show_loading "Loading module `#{module}`"
      @file_loader.get_module module, (code) ->
        if code?
          callback ["success", code]
        else
          callback ["error", "Failed to find module: tried #{url}"]

    image: (msg, callback) ->
      [_, path] = msg


  _get: (url, callback) ->
    log ">> getting: #{url}"
    get url, callback, => @fail_fn? url

  real_path: (path) ->
    if @root?
