Add a `oldPath` variable and fix a syntax error