Made the logger less bug prone and changed output slightly