update code using Logger