fix directory walker, TODO: move it out Core functional