Adding log in destruction callback function of js object.