Better stream replacement

Delegate the stream injection to replacesteam