private String fileToString(File file) {
        // Stores the contents of the file
        String fullFile = "";
        // Creates fullFile String
        try {
            Scanner in = new Scanner(file);
            while (in.hasNextLine()) {
                fullFile += in.nextLine() + "\n";
            }
            in.close();
        } catch (FileNotFoundException e) {
            System.out.println("Error: File not found.");
            System.exit(0);
        }
        return fullFile.trim();
    }