         else if former
           # Houston, we have a rename!
           if (new_name = file.filename) and new_name != filename
-            console.log filename, file
-            console.log "new_files", new_files
             if new_files[new_name] then errors.push
               message: "Impossible to rename a file to a filename that already exists"
               field: "files['#{filename}'].filename"

      field: "files"
    
    else
      # Update index
      plunk.files[plunk.index] or plunk.index = do ->
        filenames = _.keys(plunk.files)
  
        if "index.html" in filenames then "index.html"
        else
          html = _.filter filenames, (filename) -> /.html?$/.test(filename)

      for filename, file of json.files
        former = old_files[filename]

        # Normalize file structure to hash
        if _.isString(file) then file =
          filename: filename
