Added check for stuck tests and tidied up output when waiting