change existsSync which is now in 'fs'