replaced Path.existsSync with Fs.existsSync