bug fix. (missing return)
Add API to write object instance.