able to construct filepath from the filename and dir