passing tmpdir specified by user