Flush buffers only when DEBUG=0