Modify script run_tests.sh
    Refactor extract function capture_output and cleanup_and_exit
    Store exit status in file when a test fails and check for this file continuously to exit script as fast as possible