wrap call in bracket to promptly close connection on exception