add a log message if some elements are not written into a file
fix duplicated elements