fixed warning of path.exists vs fs.exists