a program that writes diary and save the content to the confirmed txt file