close And wait