use tmp for tmpdir in dpm