fix error when deleting a watched file