use logger instead of print statement