added an option for cleanup when test is done