Modify logs to use logging module