Do not leak gfile when adding recent doc

Plug leak introduced in recent refactoring