refine logging for scripts
use TDCommandResult ... everywhere