Added flushing logs to node client