Minor update; better exception logging; fix NPE