Fixed unclosed file channels