Prevent memory leak from unclosed FILE* descriptors.