Fix bug in error logging during persistence.
Merge pull request #72 from jrmehle/fix_error_logging

Fix bug in error logging during persistence.