Improve the test-check script