This is one of the few places you are not checking if you can log before logging.