test resaving with errors