Adding log in the destruction callback function of js object.