change depracated 'File.exists?' to 'File.exist?', add == to conditionals