Add write callback

Add an optional callback to signal write completion