finish off the write callback stuff