Pass filepointer to dump_memory