docs: function(next) {
            var wait = 0;
            function _exec() {
              var trans       = [];
              var transStream = through2();
              var mainStream, bodyStream, writeStream, temp;
  
              if(writtingFiles[dest]) {
                // Try leater
                grunt.verbose.writeln('  ... wait for %s before writing (%s)', dest, wait++);
                return setImmediate(_exec);
              }
  
              writtingFiles[dest] = true;
  
              // Create the transformation pipeline
              tally.files++;
  
              // If the file is empty, just create an empty file and go next
              if(!statSrc.size) {
                fs.writeFile(dest, '', next);
                return;
              }
  
              // Each transform builder is called and combined in
              // one readable/writable stream using stream-combiner
              if(transforms && transforms.length) {
                trans = _(transforms)
                // Call each tranform stream builder
                .map(function(f) {
                  return f(src, options.realDest, _.extend({}, options), addFiles);
                })
                // Keep only stream (ignore anything without a pipe() method)
                .filter(function(s) {
                  return s && s.pipe;
                });
                transStream = bun(trans);
              }
  
              mainStream    = new StreamStream();
              bodyStream    = fs.createReadStream(src);
  
              if(readOnly) {
                writeStream = devnull();
              } else {
                if(src === dest) {
                  writeStream = through2();
                } else {
                  writeStream = fs.createWriteStream(dest, {mode: mode});
                }
              }
  
              grunt.verbose.writeln(
                '  read(%s) -> transform(count:%s) -> write(%s)',
                src.blue,
                trans.length.toString().blue,
                dest.blue
              );
  
              // pipe all together
              if(banner){
                mainStream.write(strToStream(banner));
              }
  
              mainStream.write(bun([bodyStream, transStream]));
  
              if(footer){
                mainStream.write(strToStream(footer));
              }
  
              mainStream.end();
  
              // Write out
              mainStream.pipe(writeStream);
  
              mainStream.on('error', function(error) {
                grunt.fail.fatal(error);
              });
  
              writeStream.once('finish', function() {
                writtingFiles[dest] = false;
                if(readOnly) {
                  return next();
                }
                if(src === dest) {
                  // Copy temp file to destination.
                  writeStream
                  .pipe(fs.createWriteStream(dest, {mode: mode}))
                  .once('finish', next);
                } else {
                  next();
                }
              });
            }
            _exec();
          }