Added directory middleware that doesnt work