checking for errors

this could fail all over the place, so trying to catch an exception and
dumping to log if ncessary.
removing unused test harnesses