Added a better logging system using the logging module