Added logging when closing database after successful transaction.