refactor code
added tsh regex
another HD-T fix
another HD-T fix
output formatting
output formatting
output formatting
log file writing
log file writing