responds with 404 if uri is not dir or file