Fixed bug in logger code.