Bug fix for retrieving default gateway when the script is executed by crontab