+## File descriptor assignments:
+##
+## 0 -- original stdin (never touched)
+## 1, 2 -- stdout, stderr, redirected to 3 while running comamnds
+## log -- logfile and original stderr (verbose), or logfile only (quiet);
+## captures command output
+## diag -- logfile; primary diagnostic output
+## term -- orginal stderr; secondary diagnostic output (with colours)