diff --git a/README.md b/README.md
index d71de839b8fabb..ed8c98a4c3774f 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ For Bosch vehicles, the Eon will just simply shutdown as usual when battery fall
- Added primitive tuning script: To invoke live tuning: (a) turn on tethering on your Eon, (b) install JuiceSSH or similar and connect your cellphone to the wifi of the Eon using 192.168.43.1 and import the Comma private key, (c) in JuiceSSH in the SSH session on the Eon issue cd /data/openpilot command, then ./tune.sh. The text UI will be shown. (d) turn "tuneGernby" to a "1" (e) start driving and change the values to tune your steering. It is best to have a cell phone mount in your car. Note: It takes 3 seconds for any changes to take effect.
-- Replaced dev UI with @perpetuoviator dev UI with brake light icon by @berno22 - Thank you both! NOTE: There are lots of conveniences in this UI. When the car is on, you have to press the top left corner to get to the Settings screen. If you tap the lower right corner you can see the tmux session. The brake light icon doesn't work properly with some cars (needs a fingerprint tweak I believe. The wifi IP address and upload speed is printed on the screen. The brake light icon is so that you can see if OP is causing the brake lights to turn on and off and pissing the guy or gal off behind you.
+- Replaced dev UI with @perpetuoviator dev UI with brake light icon by @berno22 - Thank you both! NOTE: There are lots of conveniences in this UI. When the car is on, you have to press the top left corner to get to the Settings screen. If you tap the lower right corner you can see the tmux session. The brake light icon doesn't work properly with some cars (needs a fingerprint tweak I believe. The wifi IP address and upload speed is printed on the screen. The brake icon is so that you can see if OP is causing the brake lights to turn on and off and pissing the guy or gal off behind you. NOTE: For GM vehicles, the brake icon indicates use of the friction brakes on the vehicle instead of the brake lights themselves.
UI touch controls:
[Acess "EON Settings" by touching the top left hand corner (left side of the Speed Limit sign)]
[Acess "TmuxLog" by touching the bottom right hand corner]
diff --git a/selfdrive/kegman_conf.py b/selfdrive/kegman_conf.py
index e269c77e45ddde..2115a9d2f1c933 100644
--- a/selfdrive/kegman_conf.py
+++ b/selfdrive/kegman_conf.py
@@ -36,7 +36,12 @@ def read_config(self):
return self.config
def write_config(self, config):
- with open('/data/kegman.json', 'w') as f:
- json.dump(self.config, f, indent=2, sort_keys=True)
- os.chmod("/data/kegman.json", 0o764)
-
+ try:
+ with open('/data/kegman.json', 'w') as f:
+ json.dump(self.config, f, indent=2, sort_keys=True)
+ os.chmod("/data/kegman.json", 0o764)
+ except IOError:
+ os.mkdir('/data')
+ with open('/data/kegman.json', 'w') as f:
+ json.dump(self.config, f, indent=2, sort_keys=True)
+ os.chmod("/data/kegman.json", 0o764)