renameFile(oldname, newname) {
    return Q()
      .then(() => checkFileExt(oldname, this.type, this.ext))
      .then(() => checkFileExt(newname, this.type, this.ext))
      .then(() => checkFileExist(oldname))