Ending an app - the watch crashes

Hi,

I am not very experinced in writing an app. I do a session recording and want to end the app on user request via a user menu. If the user does this, my entire FR935 hangs and can only be resetted.

https://www.dropbox.com/s/nh91xcerf4s2efk/code2.JPG?dl=0

Do I have to wait some time until I release sys.exit()???