Added handling corrupted packages