pass path to notfound middleware