Error check fs.statSync