Replace some write to stdout