Added close callback as well as final close callback.