add test for AUE-190
handle temp directory more better