Added proper logging to track JSON truncation