added a bit more checking for start_ifnotrunning.sh