using temp dir instead of a dedicated directory