fix stdout flush && tail 'stdout' to stdout