Add new frame for T000 frames.  change log file dir to work dir. Add some more cleanup to code