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

...ging errors

@cos please review
minor: extract `toKore.getItems().get(i)).getFilename()` into variable