more sqlite error handling