Return immediately when an error has occurred
Simplified decoder loop