sanity checks for invalid paths