file dump function complete, needs testing