exhaustive reorg and bughunt, and implement script for all terminals
fix connected, reorg motd bashrc env to allow script log, and improve backup code structure and function