changed to --out option, more explicit name, added return in error blocks to abort script