refactored some code, made it more readible, still have the same 3 issues. waiting for a child process to terminate breaks the deamons kill functions...
changed file opetions to low level, still wont write. dont know whats going on...