close files explicit (closes #21610)

Patch by mattip.
1 file changed