better reference document for save
use temp dir provided by the OS