add unit test;
use local varible;
remove temp file