Removed middleware for manipulating the url path and used regex with express router instead. Removed string manipulation from file controller and am using path methods instead