private void saveStatsToFile(){
        System.out.println("saveMenuListener");
        try {
            BufferedWriter writer = new BufferedWriter(new FileWriter(myWords));
            Collections.sort(wordList);
            for (WordStructure word:wordList) {
                writer.write(word.getWord()+"/");
                writer.write(word.getTranslation()+"/");
                writer.write(word.getNumberOfAttempts()+"/");
                writer.write(word.getNumberOfCorrect()+"/");
                if(word.getNumberOfAttempts() != 0){
                    word.setPercentOfLearning(word.getNumberOfCorrect()*100/word.getNumberOfAttempts());
                } else {
                    word.setPercentOfLearning(0);
                }
                writer.write(word.getPercentOfLearning()+"/");
                writer.write(word.getDateOfAddition()+"\n");
            }
            writer.close();

        } catch (IOException ex) {
            System.out.println("Can't write to file!");
            ex.printStackTrace();
        }
    }