Handle debug end in a better way. Now farabi6 server process doesnt crash at least :)