Requires tmpdir