properly handle config files and switching on/off dev_mode