diff --git a/tasks/index.js b/tasks/index.js
index <HASH>..<HASH> 100644
--- a/tasks/index.js
+++ b/tasks/index.js
@@ -1,18 +1,8 @@
 'use strict';
 
 var i18next = require('..');
-var through2 = require('through2');
 var vfs = require('vinyl-fs');
 
-var tap = function(callback) {
-    return through2.obj(function(file, enc, done) {
-        if (typeof callback === 'function') {
-            callback();
-        }
-        done();
-    });
-};
-
 module.exports = function(grunt) {
     grunt.registerMultiTask('i18next', 'A grunt task for i18next-scanner', function() {
         var done = this.async();
@@ -23,9 +13,9 @@ module.exports = function(grunt) {
             vfs.src(target.files || target.src, {base: target.base || '.'})
                 .pipe(i18next(options, target.customTransform, target.customFlush))
                 .pipe(vfs.dest(target.dest || '.'))
-                .pipe(tap(function() {
+                .on('end', function() {
                     done();
-                }));
+                });
         });
     });
 };
Fix the grunt task.

Wait for all files to be written before finish the task.