added code for restarting a job as opposed to overwriting. not yet exception-free but works mostly