Fixing Console.debug to log and UI