Updated message key extraction script