public void saveFile() throws IOException {
        
        Collections.sort(scorelist);
        Collections.reverse(scorelist);
        
        PrintWriter fileOut = new PrintWriter(new FileWriter(fileName));
        for (int i = 0; i<5 && i<scorelist.size(); i++) {
            fileOut.println(scorelist.get(i));
        }
        fileOut.close();
    }