Properly detect log file rotation when the file isn't where it should be, or no longer is the same file as the one in the right location.
Remove unused cruft.