Do not log reg code

Yes, therefore I'd prefer simple `if` which is better readable here IMHO.