Add support for tracing on write. Ref #2
Return unexpected result kind value on error