remove unused code, fix bad js
move from fs.statSync ot fs.stat using asyncMap