try (BufferedReader fin = new BufferedReader(new FileReader(args[args.length - 1]))) {
while ((currLines = fin.readLine()) != null) {
System.out.println(currLines);
}
}
catch (FileNotFoundException error) {
System.out.println("File " + args[args.length - 1] + " not found.");
System.exit(0);
}