Try to fix the computation of MAX_CHILDS and add echo output