configure tmpdir and pass around