exercise 13-9: new thread for each file