changes path.existsSync to fs.existsSync