Strengthening file handling sections. Also adding a lilmit to the count of graphs to be added (currently hard coded)