ScopeGuard and tmpdir function in utils, consecuent refactor
Add daemon skeleton