Always close connection when done, even if error