config files and templates: fix deprecation warnings