Rearrange error reporting