Error closing "file" when last return code is a duplicate record