branch code for os version
modified terminateApp