Made logging not write on every log request and actually write only every few seconds.