keep track of path end; fix open fd error, -f blocks -R and -F