Fixed problem with script stopping when closing window
Stop child process
Added working directory