check battery.charging before shutting down instead of disabling battery API