Added Error Flag

If an error has been detected, ErrorOccured() will return true.