Change registryName to registry.
Add XDG_CONFIG_HOME check.