Implementation note: if multiple threads would concurrently use this class,
the log output of the different threads could produce meaningless interfered
results (if needed, can be easily fixed by outputting related things as one
log statement, but for current usage this is unneeded).