explicitly close files (closes #23090)

Patch by Brian Kearns.
1 file changed