change print statements to logger lines