do some path error checking