Chord: set temp dir and handle event looper