add TEST_LOGFILE env to control log output
remove tmp file