add reportWarning function