make sure not to erase own directory
set up env tmpdir staging area