Fixed helpers not closing file streams.