Added check for existing configuration directory.