Chap 26 Initial code (write to file)