added explicit check for XDG_CONFIG_HOME