fix filesave bug, now should restore files properly