Add more debug info to clearEntities()