fix #38

add fs.exists check before fs.statSync