Changes print statement to use logger instead.