use logging instead of print