if flushImediatly is set to true then logWritter is flushed with each call