bug fix, also check the path if user specified by -s option