added resetting to null for file nema in deleting function