writing the remaining articles to the file