Added some better logging to the console