now saving graphs into files