initializing and beginning to record to database
basic analysis logic and write functioning, but having a sqlite3 memory leak