p.s. Jean_Luc insert in you code not shutdoun then something happen in yours kangaroo or BSGS, but power on "PAUSE" because of no pause I was 2 times lost result of 2-5 day's work.
LOL. Just create .bat file with start command like this:
Kangaroo.exe [...your start settings -d -gpu etc.]
pause
and your problem go forget.