replace log only when there is something useful to log