change the way of determining end of computations;
allows to run DynamoWebServer only in headless mode