title: async eachSeries - callback never called
body: <p>I have a problem with async.eachSeries - I'm using it to iterate an array and download files using a function (see source) - but the callback is never called... Am I doing something wrong? I'm not sure about the callbacks...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function checkAndDownloadPlaylist(data,cb) {
  
      async.eachSeries(data,function(val,callback) {
          url=val.media[0];
          fileSize=val.fileSize;
          checkAndDownloadItem(url,fileSize, callback);
      }, function(error) {
          // never called...
          if(error) {
              return cb(error);
          }
          cb();
      });
  
  }
  
  function checkAndDownloadItem(url,fileSize,cb) {
  
      if(checkedUrls.indexOf(url)==-1) {
          fileName=getFileNameFromUrl(url);
          filePath=path.join(config.movieDir,fileName);
  
          // save file in usedFiles[]
          d=new Date();
          usedFiles[fileName]=d.toISOString();
  
          fs.access(filePath, fs.constants.F_OK, function(error) {
              checkedUrls.push(url);
  
              if(error) {
                  // file is not there
                  winston.debug('file Missing, start DL: '+fileName);
                  download(url,filePath,cb);
              }else{
                  // file is there
                  winston.debug('file already there: '+fileName);
                  cb(null);
              }
  
          });
      }
  }
  
  function download(url,destination,cb) {
  
      winston.debug('start DL: '+url);
  
      var tmpDestination=destination+'.tmp';
  
      file=fs.createWriteStream(tmpDestination);
      request = http.get(url, function(response) {
          response.pipe(file);
          file.on('finish', function() {
              winston.debug('finished DL: '+url);
              file.close();
  
              fs.renameSync(tmpDestination,destination);
              cb(null);
          });
      }).on('error', function(error) {
          fs.unlinkSync(tmpDestination);
          if(error) {
              cb(error.message);
              winston.log('notice','error DL: '+url);
          }
          cb(null);
      });
  }</code></pre>
  </div>
  </div>
  </p>