Write system output to JSON file