fixed write headers once
Merge branch 'incrementally_run' into develop