* Added a test for issue #493.
Changes to logging and NPE checks.