improving the start script to handle cleaning up of process when one fails