add Write Functions

1.WriteString, WriteWstring
2.some tedious modification