add maxBuffer, fix for 'stdout maxBuffer exceeded'