Sampling before sleep(), so it will begin with the adjustments

Sampling should happen before sleeping :)
Also, I changed the mode to +x for the shell script.