Switched from XML to JSON format

Basic "write to file" method created