close the file even if an exception occurs #5536
2 files changed