change print to logger