rm path.existsSync() as it is deprecated