added delete_failed option