updating if checks around trace level logging