adding creation of message for warn and crit