fix to remove cron file when changing runmode