making the logger safer