Setting default "" for var for path.join.
bring file path transform into a function