error checks more err first, replaced a eachSeries with async.map