test stream writes to file and rotates