code: function saveFile() {
        if (currentFile) {
          if (!currentFile.oldName) {
            currentFile.oldName = possibleOldName;
          }
  
          if (!currentFile.newName) {
            currentFile.newName = possibleNewName;
          }
  
          if (currentFile.newName) {
            files.push(currentFile);
            currentFile = null;
          }
        }
  
        possibleOldName = undefined;
        possibleNewName = undefined;
      }
docs: /*
  Add previous file(if exists) before start a new one
  if it has name (to avoid binary files errors)