Fixed an issue with open files.