Only delete #file when needed (i.e. tagname change).