modify buffer and stdlog