Completed my version of exercise 22, aka, do I still remember file IO