fix error message so that it is reachable

Noticed there was a "goto" before printing out the error message. Moved it around so that it matched the other checks in the same section.