Sync data one last time when you stop recording so
all of the activity instance is saved to the server.

detect_sts.m fixed matlab script need to test!!!
Latest working version!