Fixed logging to the sqlite table. Fixed setting up the strings