Added logging to the console