Improved diagnostics
Forked tg.sh into tg2.sh
First functional version of tg2.sh