Refactoring StreamIO write to isolate warnings and notices