- Fixed logger usage to avoid NullReferenceException