stream to file and term works