Refactor verbose mode to use the logging module