Attempt at saving json as a file. Unable to test properly