tweak get maskPath function