Fixed minor bug not checking logger instantiated