I'm making a hangman game and the goal is to save the stats for different players, such as their name, games played, and wins. I have this part working, but every time I run the program it deletes the previous data and replaces it.
public static void writeStats(File file,String name, int won, int games) {
    try {
        PrintWriter pw = new PrintWriter(file);
        pw.println("Player\tWon\tTotal");
        pw.println("-----------------------------");
        pw.println(name+"\t"+won+"\t"+games);
        pw.close();
    } //end try
    catch (IOException e) {
        System.out.println("Failed to write file!");
    } //end catch
} //end method
 
     
    