Cleanup memory when file parsing is done