Replace StreamReader with mutable implementation