using logger instead of printf