Process invalid lines and flush to stdout in batches.