clean up onTestComplete error handling