NoSql Write to file fix