Refactor to avoid misleading log messages