Clean up line numbers

Only determine the line an error occurred on when the
error occurs.