Added debounce to the contents modified event