Fixed reading stdout