changed logWarning to logError and changed comparison operator from === to ==