Write number of bytes read to error position on successful decode