Write to temp file, grab temp file