move defer client.Close to after checking error, check some more errors, use bradfitz's go-sqlite3 temporarily