Fixed load memory management bug
beginnig to make load write to files