Added #define to disable logging (things are "tad bit" faster without logging)
Increased per-logfile lines to 256k
Counting new lines, not log openings
Refactoring to get rid of copypasta, far from done.