Enclose the delete in a `finally` block to make sure it is always deleted.