storage takes ownership of the FILE* (really need to change this API).