defer close conn