Remove prints and use logging.