Change in lua code arch to let me start up with different programs and safely clean up after errors