move set -e to top