Move the origin check out of the try loop

There's no reason this check has to be within the try loop. If it
throws an error, it shouldn't be silently swallowed.
Merge pull request #32 from fmarier/origin_check_location

Move the origin check out of the try loop