plugins: core: config: use 'with' to open() files