system shutdown detection