Replace print statements with logging module