Fixed --ignore-errors behaviour

Current code ignores the '--ignore-errors' flag when it shouldn't. Attached patch fixes the issue.

Thanks