() bug fixed: counter and logs are cleared rather than replaced