Use logging to control the output
Add logging output