(function() {
  'use strict';

  var PLUGIN_NAME = 'gulp-closure-compiler-service';

  var through = require('through2');
  var gutil   = require('gulp-util');
  var closure = require('closure-compiler-service');

  module.exports = function(options) {
    'use strict';

    var closure_service = function(file, enc, callback) {
      var that = this;

      // NOP
      if (file.isNull()) {
        that.push(file);
        return callback();
      }

      if (file.isStream()) {
        that.emit('error',
          new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));

        return callback();
      }

      if (file.isBuffer()) {
        closure.compile(file.contents, options, function(errs, code) {
          if (errs) {
            that.emit('error',
              new gutil.PluginError(PLUGIN_NAME, errs[0].error));

            return callback();
          }

          file.contents = new Buffer(code);
          that.push(file);
          return callback();
        });
      }

      else { return callback(); }
    }

    return through.obj(closure_service);
  };

})();

@@ -84,23 +84,23 @@
 %0A%0A  var 
-through
+gutil  
  = requi
@@ -107,16 +107,17 @@
 re('
-through2
+gulp-util
 ');%0A
@@ -118,31 +118,31 @@
 il');%0A  var 
-gutil  
+through
  = require('
@@ -137,33 +137,32 @@
  = require('
-gulp-util
+through2
 ');%0A  var cl
@@ -733,16 +733,31 @@
 if (errs
+ && errs.length
 ) %7B%0A    

Check errors length