Do some error checking better in permadelete