Correcting error in logger condition