made it use a temp dir instead