clean up test if there are any errors