closing handles in destructor