Added extra log messages for sendMessage() and close()