code: function move(oldPath, newPath) {
    if (toDel[oldPath] || !fileExists(oldPath)) {
      log('Error: no file to move: ', 'red', oldPath);
      throw new Error('No file to move');
    }
  
    if (fileExists(newPath)) {
      log('Error: target file already exists: ', 'red', newPath);
      throw new Error('Target file already exists');
    }
    if (fileLines[oldPath]) {
      fileLines[newPath] = fileLines[oldPath];
      delete fileLines[oldPath];
    }
  
    // if (asts[oldPath]) {
    //   asts[newPath] = asts[oldPath];
    //   delete asts[oldPath];
    // }
  
    if (toSave[oldPath]) {
      toSave[newPath] = true;
      delete toSave[oldPath];
    }
  
    if (toDel[oldPath]) {
      delete toDel[oldPath];
    }
    // if the file has already been moved
    oldPath = _.findKey(mvs, s => s === oldPath) || oldPath;
    mvs[oldPath] = newPath;
  }
docs: function saveAst(filePath, ast) { asts[filePath] = ast; // Update file lines when ast is changed save(filePath, generate(ast).code.split(/\r?\n/)); }