Use logging module instead of print statements