handle errors returned by sqlite3 when creating the db table and inserting data to it