code: function onFlush(fd, callback) {
      // TODO: removing this before readStream because it replaces the stream
      file.contents.removeListener('error', onComplete);
  
      // TODO: this is doing sync stuff & the callback seems unnecessary
      // TODO: Replace the contents stream or use a clone?
      readStream(file, complete);
  
      function complete() {
        if (typeof fd !== 'number') {
          return callback();
        }
  
        fo.updateMetadata(fd, file, callback);
      }
    }
docs: Cleanup