I see now that this is being copied into a temp directory. Is that really necessary?