fix bug where err in readdirCb() stopped scanning