Is it possible to close the simulator when using instruments uiautomation recorder?-Collection of common programming errors

I’m currently recording a lot of test for my App using Xcode Instruments UIAutomation, the current issue I’m facing is that if I run more than one script at the time or even 1 script but with the simulator currently running is just crashes.

Is there a command or any other way to close the simulator every single time a test script finishes?