bug fix: close unclosed file id, #438