added delete if corrupted flag