Added check for logger global before attempting to log in places where logging may occur before the logger is ready
Added fall back print statements in case logger is unavailable