replaced locks->save with locks->insert and updated exception handler to properly fail on exceptions other than duplicate key, like write concern