Added reading and writing to file for settings