fixed a log error

fixed line 234 where it would not use the logIf method