Add after write hook