there's some weird check for loglevel that i don't understand :/