Making some progress with log to sqlite