improved auto-clear on files update