make nocrash.sh more flexible