Replace fs.statSync with fs.stat.