Adding logging for string length