add logic to check whether close success