Add -x to apply.sh for debugging