thread creation fix + bug check

i fixed something in the thread creation and assignment,

i add a null check about result matrix that we fail

i ran our code with the parameters ak47.lif 2 2 2 100 100