persist data to sqlite db instead of textfile