add cleanup for temp data dir
fix test