0.1.7: add open and close callback.