Adding the onCorrupted event and Corrupted Exception