Properly flush and close tracking log file

The log file used to write tracking was not closed properly, having
unwritten data stuck somewhere in a buffer until either Windows decides
to write it out or Spotter is closed?