update hook code to remove script after load/complete.