chapter 22, exercise 3, closing file after last test