Change so logging only happens every fifth time now, to not let the browser crash when the log fills up