fix deprecation warning on File.exists?

fix deprecation warning on File.exists?