added logic for starting system calls while batt service is running and ending them when the service ends