(Bug 4855) Do not proceed when we fail

When we fail, cut it short. Don't continue.
Merge pull request #261 from afuna/fail-return-bug4855

(Bug 4855) Do not proceed when we fail