add dataset.analys_fields for standrad analysing output
fix some writing bugs