Added handling of corrupted region files