Did example 16

Includes reading, writing, and truncating a txt file.