Practice to write in a text file