[PATCH] proc: refactor reading directories of tasks