Close db conn after each func