This is opened outside of this `begin`/`ensure` block. Shouldn't it be closed even if we don't reach the `begin`? Same goes for calling `FileUtils.rm_f`.