store media data to temp files