batch write and free err string
Merge branch 'develop'