use Pathname instead of Dir