better error message information when trying to access deleted record