Added debug option to process only the first chunk.