add memory file support