mac does not support memorystreams (fmemopen and open_memorystream) as well... using regular file there too