Replaced try/except with os.path.exists() in battery.py