Added reading and writing JSON objects to file