Fixed a critical bug which caused a few articles to be avoided while adding to output file.