1. Fix a bug: if a file can't be opened, the program will die.