Improved efficiency while logging