run.sh improvements