Calling old getPathString does not work in extansion with same name. Moved to var now, and wrap in function to prevent the tmp var from leaking