Modifications for simulation result collection
Plotting to external file