add function logWarning() to log messages with WARN prepend. Exports function