Changed the way logging works