Check for null logger before trying to close it.
Merge pull request #478 from hssm/import-fix

Check for null logger before trying to close it.