replaced async file walk through with sync