added output file for ch8 program