changes ForEachStream to use node v0.10+ stream API