fix reading of smac stats file.
various fixes and debugging.