added 'set -e'