Implementing over-temperature and overcurrent protection