corrected the inputs to spawn and added code to stop restarting a process that terminates immediatley on start