fix err function inside readAndInsertArticles