made main.sh executable & sleep 1 second when restarting