improve test-master.sh