grunt task : the 'end' and 'error' listeners were set on the wrong stream.

This issue might cause incomplete output because the task terminates too soon.