add trap handler to start-test-stop