added a lock to simulation_process threads to only allow a single thread to write results at a time. Refs #150