Extracted change_log logic