Can we change this to logWarning, and also print out the stack trace?