defer Close method

defer Close method