added memory file stream