Added logging of values to a SQlite database