python max buffe stdout error fixed