Adding check that Logger exists before logging to it