updated fileRead to generate and save graphs