Added ds_hook/2 for open/close hooks