use logging instead of print statements