Added code to save summary outputs.