diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index c6ec62ed62fcf4d43b4cc62461ff7f5721019965..608413226b6c526876dcec0ffc9ee3e000abe2c2 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -265,14 +265,15 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
 
 		if (!(obj = ast_sorcery_alloc(sorcery, type, id)) ||
 		    ast_sorcery_objectset_apply(sorcery, obj, ast_variable_browse(cfg, id))) {
-			ast_debug(1, "Could not create an object of type '%s' with id '%s' from configuration file '%s'\n",
-				  type, id, config->filename);
 
 			if (config->file_integrity) {
 				ast_log(LOG_ERROR, "Config file '%s' could not be loaded due to error with object '%s' of type '%s'\n",
 					config->filename, id, type);
 				ast_config_destroy(cfg);
 				return;
+			} else {
+				ast_log(LOG_ERROR, "Could not create an object of type '%s' with id '%s' from configuration file '%s'\n",
+					type, id, config->filename);
 			}
 
 			ao2_cleanup(obj);