iterate over chunks of files