Make sure that all files are closed upon attempts to open a broken DB.