removed $supportedDocPaths and modified the method validateAndEncodePath()