added finishSetUp to programSetUp in order to getFlags and to print warnings only at the end and such