generate tmp file for sae