Add ability to invoke callbacks on the writer