Add a callback after data was written to the client