change print to logging