fn() takes optional 2nd arg for dir.