Destructors/finally blocks are really important when calling user-provided code (like a callback or something like that), but this is a small segment of code which you can easily verify will never reasonably fail (where you need to remember to close the file), so you're fine without a finally-block here.