changes to make analysis run automatically
changed reading of table jsut to the front of the writing to minimize the chances to loose an entry