fixed logger and did some changes in destructors