require pathname module explicitly