stop and restart fix if state file problem occurs - added status task