Add --stop-on-fail flag to test.sh
Fix new line on write