set isServiceRunning=false as last line