remove extraneous io exceptions + improve generic infrastructure for log...

...ging errors

@cos please review