1) 3 nested for loops that calculate extapp stats. We need to keep track if previous extapp json was written so generate proper json syntax. To generate ",".
2) Output extapp stats even if pool_size == 0