exception handling added to fan/heater control