Moving job_all.sh to use directories for the pid
Improving the cluster scanning function