redesign with 1. config file, 2. loop and 3. processing of exit codes
redesign with