Use fancy automatic try with thing to automatically close the tx