Backport some centos-6 only things CentOS 6 so this keeps working on 5
Remove unneeded function needTsRemove
Stringify things we want to print