Update to warning message function