Comment out db.close - seems to be no longer supported