chapter3 file I/O