Working on mac

Event loop, read and write local config