Remove trailing whitespaces
Remove the timeout test

bash(1) manpage says "The exit status is greater than 128 if
the timeout is exceeded".
Add test
Preserve input and output string
Simplify timestamp logic