Improve crontab update logic