Burning in switch in Blackrock

Got a call out to a house in Blackrock on Friday. The customer got a smell of burning from a dimmer switch. On investigation I found wood behind the switch starting to burn. This could have caused a fire in the home.  I installed the proper box behind the switch and used a new switch.