saving via stream IO working