function rollbackFileRemove(db, step, task) {
  return new Promise(function (resolve, reject) {
    var gfs = Grid(db);
    var data = step.dataStore[0];

    gfs.exist({_id: data.removed}, function (err, exists) {
      if (err) return reject(err);

      gfs.findOne({_id: data.shadow}, function (err, shadowFile) {
        if (err) return reject(err);
        if (!shadowFile) return resolve();

        function done() {
          dbUtils.removeFile(data.shadow, gfs).then(function () {
            updateState(task, step.index, ROLLED)
              .then(resolve)
              .catch(reject);
          });
        }

        if (exists) return done();

        var writeStream = gfs.createWriteStream(shadowFile.metadata.oldFile);

        writeStream.on("close", done);
        writeStream.on("error", reject);

        gfs.createReadStream({_id: data.shadow}).pipe(writeStream);
      });
    });
  });
}
Rollback for file remove step.

@param db native db
@param step the file remove step
@param task the task containing the step.

@returns {Promise|*}