Changed output file format to appending so all outputs are saved