split order of error checks