prepublish hook