Added logging for chunk generation