Using url module for url resolvement, and the path module to resolve the file type.
The old issue persists =\