use memory variable stream instead of tmpname, since its unsupported on many hosts.