Fixing logging error