Add local output for number of iterations
Close writer in finally block
Merge pull request #1 from placeiq/feature-DS-944

Add local output for number of iterations