added functionality to write current state of simulation to an output file, nbody.out